<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head th:include="/common/inc::header"/>
<body>
<form class="layui-form" style="margin-top: 15px">
    <div class="layui-form-item">
        <div class="layui-inline">

        </div>
        <!--<button class="layui-btn" lay-submit lay-filter="searchBtn">查询</button>-->
    </div>
</form>
<table class="layui-table" id="grid" lay-filter="grid">
</table>
<script th:replace="/common/inc::incJs"></script>
<script>
    var id = getQueryString("id");
    $(function () {
        var tableIns = createTable({
            url: '/backend/security/billItem/findList?billId=' + id,
            cols: [[{field: 'serviceId', title: '项目编号', width: 100},
                {field: 'serviceName', title: '项目', width: 100},
                {field: 'sortId', title: '类型', width: 100, templet: '#tem_sortId'},
                {field: 'itemType', title: '类别', width: 100, templet: '#itemTypeTpl'},
                {field: 'amount', title: '数量', width: 90},
                {field: 'price', title: '价格', width: 100},
                {field: 'stylistName', title: '造型师', width: 100},
                {field: 'stylistReward', title: '造型师提成', width: 100},
                {field: 'cashScore', title: '现金业绩', width: 100},
                {field: 'vipScore', title: '会员卡业绩', width: 100},
                {field: 'technicianName', title: '技师', width: 100},
                {field: 'technicianReward', title: '技师提成', width: 100},
                {field: 'assistantName', title: '助理', width: 100},
                {field: 'assistantReward', title: '助理提成', width: 100},
                {field: 'couponFee', title: '优惠券金额', width: 100},
                {field: 'integralDeductFee', title: '积分抵用券', width: 100}
            ]]
        });

        //查询功能
//        layui.form.on('submit(searchBtn)', function (data) {
//            tableIns.reload({
//                where: data.field
//            });
//            return false;
//        });
    })

</script>
<script type="text/html" id="tem_sortId">
    {{#  if(d.sortId === 0){ }}
    <span>{{ '洗剪吹' }}</span>
    {{#  }  else if(d.sortId === 1) { }}
    <span>{{ '洗吹' }}</span>
    {{#  }  else if(d.sortId === 2) { }}
    <span>{{ '烫发' }}</span>
    {{#  }  else if(d.sortId === 3) { }}
    <span>{{ '染发' }}</span>
    {{#  }  else if(d.sortId === 4) { }}
    <span>{{ '护发' }}</span>
    {{#  }  else if(d.sortId === 5) { }}
    <span>{{ '接发' }}</span>
    {{#  }  else if(d.sortId === 6) { }}
    <span>{{ '丽人项目' }}</span>
    {{#  }  else if(d.sortId === 8) { }}
    <span>{{ '美容美甲' }}</span>
    {{#  }  else if(d.sortId === 10) { }}
    <span>{{ '外卖产品' }}</span>
    {{#  }  else if(d.sortId === 11) { }}
    <span>{{ '充值卡' }}</span>
    {{#  }  else if(d.sortId === 12) { }}
    <span>{{ '其他' }}</span>
    {{#  }  else if(d.sortId === 13) { }}
    <span>{{ '次卡' }}</span>
    {{#  } else { }}
    {{ '' }}
    {{#  } }}
</script>
<script type="text/html" id="itemTypeTpl">
    {{#  if(d.itemType === 1){ }}
    <span>{{ '小项' }}</span>
    {{#  }  else if(d.itemType === 2) { }}
    <span>{{ '大项' }}</span>
    {{#  }  else if(d.itemType === 3) { }}
    <span>{{ '卖品' }}</span>
    {{#  }  else if(d.itemType === 100) { }}
    <span>{{ '充值卡' }}</span>
    {{#  }  else if(d.itemType === 101) { }}
    <span>{{ '次卡' }}</span>
    {{#  } }}
</script>
</body>
</html>